#ifndef LRESINDEX_H_
#define LRESINDEX_H_

#include <MAUI/Screen.h>
#include <MAUI/ListBox.h>
#include <MAUtil/Map.h>

#include "../DAOs/DTO.h"
#include "../DAOs/LRESProcessor.h"
#include "../Widgets/UIBuilder.h"
#include "../Widgets/LRESItemWidget.h"

using namespace MAUI;
using namespace MAUtil;

class LRESIndex : public Screen, public LRESListener, public WidgetListener {
public:
	LRESIndex();
	~LRESIndex();
	void keyPressEvent(int keyCode, int nativeCode);
	void itemReceived(LRESItem& item);
	void processingComplete();
	void triggered(Widget* sender);
	void pointerPressEvent(MAPoint2d point);
	void pointerReleaseEvent(MAPoint2d point);
	void setIsToday(int today);
	void show();
private:
	LRESProcessor* mProcessor;
	Layout* mLayout;
	ListBox* mItems;
	Label* mTitle;
	Widget* mSoftkey;
	int mIsToday;
};

#endif /* LRESINDEX_H_ */
